import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/Login.vue'),
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('../views/Main.vue'),
      children:[
        {
          path: '/user',
          name: 'user',
          component: () => import('../views/User.vue'),
        },
        {
          path: '/role',
          name: 'role',
          component: () => import('../views/Role.vue'),
        },
        {
          path: '/permission',
          name: 'permission',
          component: () => import('../views/Permissions.vue'),
        },

      ]
    },
  ],
})

export default router
